package com.party.admin.task;

import com.party.admin.biz.notify.SysMessageBizService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 重要通知定时推送
 *
 * @author yifeng
 * @date 2018/6/26 0026
 * @time 下午 15:43
 */
@Component(value = "quartzBizSendImportantNotify")
public class QuartzBizSendImportantNotify {
    @Autowired
    private SysMessageBizService sysMessageBizService;

    Logger logger = LoggerFactory.getLogger(getClass());

    public void send(String id) {
        try {
            sysMessageBizService.sendImportNotify(id);
        } catch (Exception e) {
            logger.error("重要通知的业务定时任务异常", e);
        }
    }
}
